package com.liar;

import cn.hutool.core.lang.Console;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;
public class Main {
    public static void main(String[] args) {
        // The connection URL
        String url = "https://www.google.com/search?q=Android&oq=Android&aqs=chrome..69i57j0i433j0i3l3j0i131i433l3j0j0i131i433.6638j0j15&sourceid=chrome&ie=UTF-8";

// Create a new RestTemplate instance
        RestTemplate restTemplate = new RestTemplate();

// Add the String message converter
        restTemplate.getMessageConverters().add(new StringHttpMessageConverter());

// Make the HTTP GET request, marshaling the response to a String
        String result = restTemplate.getForObject(url, String.class, "Android");
        Console.log(result);
    }
}
